<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {

//    new \App\Api\Helpers\Push\Sms();
    return view('welcome');
});


Route::get('111', function () {

    $user = \App\Models\User::find(31);

    \Illuminate\Support\Facades\Auth::login($user);

    event(new \App\Events\TestNewEvent($user));

//    broadcast(new \App\Events\TestNewEvent($user))->toOthers();



    return 'success';
});

Auth::routes();



Route::get('/home', 'HomeController@index')->name('home');


Route::get('oauth/callback/driver/{driver}', 'Api\AuthenticateController@handleProviderCallback');


Route::get('oauth/redirect/driver/{driver}', 'Api\AuthenticateController@redirectToProvider')->name('oauth.redirect');